package com.tianji.learning.service;

import com.tianji.api.dto.trade.OrderBasicDTO;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.domain.dto.LearningPlanDTO;
import com.tianji.learning.domain.po.LearningLesson;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.learning.domain.vo.LearningLessonVO;
import com.tianji.learning.domain.vo.LearningPlanPageVO;
import com.tianji.learning.domain.vo.LearningPlanVO;

/**
 * <p>
 * 学生课程表 服务类
 * </p>
 *
 * @author yp
 * @since 2023-09-05
 */
public interface ILearningLessonService extends IService<LearningLesson> {

    public void addLesson(OrderBasicDTO dto);

    /**
     * 分页查询我的课表
     *
     * @param pageQuery
     * @return
     */
    PageDTO<LearningLessonVO> pageList(PageQuery pageQuery);

    /**
     * 查询最近正在学习的课程
     *
     * @return
     */
    LearningLessonVO queryCurrent();

    /**
     * 根据id查询指定课程的学习状态
     *
     * @param courseId
     * @return
     */
    LearningLessonVO queryByCourseId(Long courseId);

    /**
     * 检查课程是否有效
     *
     * @param courseId
     * @return
     */
    Long qualification(Long courseId);

    /**
     * 删除课表中的课程
     *
     * @param dto
     */
    void deleteLearningLesson(OrderBasicDTO dto);

    /**
     * 统计课程的学习人数
     *
     * @param courseId
     * @return
     */
    Integer countPeople(Long courseId);

    /**
     * 创建学习计划
     *
     * @param dto
     */
    void createLearningPlan(LearningPlanDTO dto);

    /**
     * 查询学习计划和进度
     *
     * @param pageQuery
     * @return
     */
    LearningPlanPageVO selectRecords(PageQuery pageQuery);
}
